package cn.com.dhcc.ddi.monitor.service.compute;

import java.util.List;

import cn.com.dhcc.app.core.exception.NiceException;
import cn.com.dhcc.app.core.exception.ServiceException;
import cn.com.dhcc.ddi.monitor.vo.Quota;
import cn.com.dhcc.ddi.monitor.vo.QuotaComputeRule;
import cn.com.dhcc.ddi.monitor.vo.QuotaValueOnTime;

public interface MonitorComputeInterface {
	/**
	 * 合并
	 * @param onTimes 实时表里面当前指标的值列表
	 * @param computeRule 计算规则
	 * @param conf 指标配置
	 * @throws ServiceException 
	 */
	public void merge(List<QuotaValueOnTime> onTimes,Quota quota,QuotaComputeRule computeRule) throws ServiceException;

	/**
	 * 告警处理
	 * @param onTimes 实时表里面当前指标的值列表
	 * @param computeRule 计算规则
	 * @param conf 指标配置
	 * @throws ServiceException 
	 * @throws NiceException 
	 */
	public void computeAlert(List<QuotaValueOnTime> onTimes,Quota quota,QuotaComputeRule computeRule) throws ServiceException, NiceException;
	
	/**
	 * 转存到历史表
	 * @param onTimes 实时表里面当前指标的值列表
	 * @param computeRule 计算规则
	 * @param conf 指标配置
	 * @throws ServiceException 
	 */
	public void moveToHistory(List<QuotaValueOnTime> onTimes,Quota quota,QuotaComputeRule computeRule) throws ServiceException;
}
